Network system, layer 3 communication device, layer 2 communication device, and route selection method

ABSTRACT

In a layer  2  communication device included in multiple layer  2  networks, an identifying unit identifies a layer  3  control packet from among packets passing through, and an embedding unit embeds routing control information for the layer  2  network in the layer  3  control packet. In a layer  3  communication device connected to the multiple layer  2  networks, a selecting unit selects from the multiple layer  2  networks, an optimum L 2  network, that is a layer  2  network forming an optimum communication route, based on a communication destination, and a setting unit sets a packet to be transmitted to the optimum L 2  network.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a network system, a layer 3communication device, a layer 2 communication device, and a routeselection method that make it possible to always select an optimum routefor communication through a layer 2 network.

2. Description of the Related Art

In recent years, a large-scale network is often built as a layer 2network because, for example, it is relatively inexpensive to installthe layer 2 network. In building the layer 2 network, a loop of a packetoccurs depending on a connection configuration of layer 2 switches(layer 2 communication devices). This leads to a phenomenon calledbroadcast storm, in which a network collapses.

To avoid the broadcast storm, it is necessary to establish a connectionform of the layer 2 switches in a tree structure physically orlogically. In a system generally adopted, layer 2 switches are connectedin a form of a mesh or a ring physically, and a part of a network isblocked logically to establish a tree structure. In this system, when afault occurs, it is possible to maintain communication connection byremoving a block or moving a position of the block, thereby realizinghigh redundancy.

To block a part of a layer 2 network, a control protocol such as aSpanning Tree Protocol (STP) may be used. By running such a controlprotocol on the layer 2 switches, it is possible to cause the layer 2switches to set a logical block autonomously. The STP is defined in“Media Access Control (MAC) Bridges”, [online], June 2004, retrievedfrom the Internet: <URL:

http://standards.ieee.org/getieee802/download/802./1D-2004.pdf>.

FIG. 13 is a diagram of the layer 2 network. Layer 2 switches (L2SW)1000 a to 1000 c are connected to one another physically to constitutethe layer 2 network. The layer 2 switch 1000 a is connected to anInternet Protocol (IP) network 3000 a through a router (a layer 3communication device) 2000 a. Similarly, the layer 2 switch 1000 b isconnected to an IP network 3000 b through a router 2000 b. The layer 2switch 1000 c is connected to an IP network 3000 c through a router 2000c.

It is assumed here that data is transmitted from the IP network 3000 ato the IP network 3000 c. In this case, a packet for transmitting thedata passes through the layer 2 network. Because the layer 2 switches1000 a to 1000 c are connected in a form of a ring, it is likely thatthe packet goes into a loop. Thus, a logical block is set in a part ofthe network (in this example, between the layer 2 switches 1000 b and1000 c) such that the packet cannot pass through the blocked part.

However, when part of the network is blocked, communication through thelayer 2 network is not performed on an optimum route. In the exampleshown in FIG. 13, communication between the IP networks 3000 a and 3000b and communication between the IP networks 3000 a and 3000 c areperformed on an optimum route. However, since communication between theIP networks 3000 b and 3000 c is performed on a route through the layer2 switch 1000 a, the communication is not performed on an optimum route.

In this example, a band between the layer 2 switches 1000 b and 1000 cis not used effectively. Communication, which should actually beperformed between the layer 2 switches 1000 b and 1000 c, consumes aband between the layer 2 switches 1000 a and 1000 b and a band betweenthe layer 2 switches 1000 a and 1000 c.

SUMMARY OF THE INVENTION

It is an object of the present invention to at least solve the problemsin the conventional technology.

According to one aspect of the present invention, a network systemincludes a layer 2 communication device that is included in multiplelayer 2 networks; and a layer 3 communication device that performscommunication through the multiple layer 2 networks. The layer 2communication device includes an identifying unit that identifies alayer 3 control packet from among packets passing through the layer 2communication device; and an embedding unit that embeds routing controlinformation for the layer 2 network in the layer 3 control packet. Thelayer 3 communication device includes a selecting unit that selects fromthe multiple layer 2 networks, an optimum L2 network, that is a layer 2network forming an optimum communication route, based on the routingcontrol information for the layer 2 network embedded in the layer 3control packet; and a setting unit that sets a packet to be transmittedto the optimum L2 network.

According to another aspect of the present invention, a layer 3communication device connected to multiple layer 2 networks includes aselecting unit that selects from the multiple layer 2 networks, anoptimum L2 network, that is a layer 2 network forming an optimumcommunication route, based on a communication destination; and a settingunit that sets a packet to be transmitted to the optimum L2 network.

According to still another aspect of the present invention, a layer 2communication device that is included in a layer 2 network includes anidentifying unit that identifies a layer 3 control packet from amongpackets passing through the layer 2 communication device; and anembedding unit that embeds routing control information for the layer 2network in the layer 3 control packet.

According to still another aspect of the present invention, a method fora network system that includes a layer 2 communication device that isincluded in multiple layer 2 networks, and a layer 3 communicationdevice that performs communication through the multiple layer 2 networksincludes identifying, performed by the layer 2 communication device, alayer 3 control packet from among packets passing through the layer 2communication device; embedding, performed by the layer 2 communicationdevice, routing control information for the layer 2 network in the layer3 control packet; selecting, performed by the layer 3 communicationdevice, from the multiple layer 2 networks, an optimum L2 network, thatis a layer 2 network forming an optimum communication route, based onthe routing control information for the layer 2 network embedded in thelayer 3 control packet; and setting, performed by the layer 3communication device, a packet to be transmitted to the optimum L2network.

The above and other objects, features, advantages and technical andindustrial significance of this invention will be better understood byreading the following detailed description of presently preferredembodiments of the invention, when considered in connection with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram to explain a communication route in multiple layer 2networks;

FIG. 2 is a diagram to explain an optimum route selection system using aRouting Information Protocol (RIP);

FIG. 3 is a diagram of a format of an update message of the RIP;

FIG. 4 is a diagram to explain an optimum route selection system usingan Open Shortest Path First (OSPF);

FIG. 5 is a diagram to explain a change in optimum route selection whena cost value is varied;

FIG. 6 is a diagram of a format of Link State Advertisement (LSA)information in an OSPF control packet;

FIG. 7 is a functional block diagram of a layer 2 switch according to anembodiment of the invention;

FIG. 8 is a functional block diagram of a control unit shown in FIG. 7;

FIG. 9 is a flowchart of a process procedure performed by the controlunit shown in FIG. 7;

FIG. 10 is a functional block diagram of a router according to theembodiment;

FIG. 11 is a functional block diagram of a control unit shown in FIG.10;

FIG. 12 is a flowchart of a process procedure performed by the controlunit shown in FIG. 10; and

FIG. 13 is a diagram of the layer 2 network.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Exemplary embodiments of the invention are explained in detail belowwith reference to the accompanying drawings.

A route selection system according to an embodiment of the inventionadopts a method of setting Virtual Local Area Networks (VLANs) amonglayer 2 networks to make the layer 2 networks multiple, and setting ablock in a different position in each of the VLANs. This method can berealized by, for example, using a Multiple Spanning Tree Protocol(MSTP).

FIG. 1 is a diagram to explain a communication route in multiple layer 2networks. In the figure, two VLANs, namely, a VLAN #A and a VLAN #B, areset in the layer 2 network of FIG. 13. In the VLAN #A, a block is setbetween the layer 2 switches 1000 b and 1000 c. In the VLAN #B, a blockis set between the layer 2 switches 1000 a and 1000 c.

When communication is performed through the VLAN #A, communicationbetween the IP networks 3000 a and 3000 b, and communication between theIP networks 3000 a and 3000 c are performed on an optimum route.However, communication between the IP networks 3000 b and 3000 c isperformed on a route through the layer 2 switch 1000 a, which is not anoptimum route.

On the other hand, when communication is performed through the VLAN #B,communication between the IP networks 3000 a and 3000 b, andcommunication between the IP networks 3000 b and 3000 c are performed onan optimum route. However, communication between the IP networks 3000 aand 3000 c is performed on a route through the layer 2 switch 1000 a,which is not an optimum route.

Thus, when communication is performed between the IP networks 3000 b and3000 c, it is possible to take an optimum route if the VLAN #B is used.Similarly, when communication is performed between the IP networks 3000a and 3000 c, it is possible to take an optimum route if the VLAN #A isused. When communication is performed between the IP networks 3000 a and3000 b, it is possible to take an optimum route whether the VLAN #A orthe VLAN #B is used.

In this way, a plurality of VLANs having different block positions areset on the layer 2 network to control the layer 2 network such thatcommunication is performed through an appropriate VLAN according to acommunication route. This makes it possible to always performcommunication on an optimum route. However, there are two problems. Afirst problem is that routers do not have means for designating a VLANto transmit a packet. A second problem is that the routers do not havemeans for learning a state of a route of the layer 2 network. If a stateof a route of the layer 2 network is unknown, it is not possible toselect an optimum route. These problems occur because, since the routersoperate in a layer 3, details of a layer 2 are concealed.

The first problem can be solved by additionally providing the routerswith a function of adding a VLAN tag to a packet (a frame) to beoutputted. Because a usual packet and a packet sent to a VLAN aredifferent only in presence or absence of a VLAN tag, this problem can besolved relatively easily.

To solve the second problem, for example, a network administrator mayset and register a state of a route of the layer 2 network in therespective routers. However, a large burden is imposed on the networkadministrator. Thus, in this embodiment, a layer 2 switch embedsinformation about the layer 2 network in a control packet exchangedamong the routers. The routers are capable of learning a state of aroute of the layer 2 network by referring to the information embedded bythe layer 2 switch.

Specifically, the layer 2 switch embeds information for routing controlin a packet exchanged among the routers. There are two representativesystems for the routing control, namely, a Routing Information Protocol(RIP) and an Open Shortest Path First (OSPF). Regardless of whether therouters use the RIP or the OSPF, it is possible to embed theinformation.

The RIP is a protocol for performing routing control using a controlpacket called an update message. Every time an update messagetransmitted from the routers periodically passes through the routers,the number of steps (the number of hops) is incremented by one. Eachrouter stores information on how many steps an update message has, fromwhich router the update message arrives, and through which route theupdate message arrives. While transmitting data on a route, the routertransmits packets to the router having the least number of steps.

In the route selection system according to this embodiment, other thanthe number of steps of the routers (the number of steps of the layer 3),the number of steps of the layer 2 switch (the number of steps of thelayer 2) is recorded in an update message. First, while transmitting anupdate message through the layer 2 network, a router replicates a packetby the number of VLANs set, and transmits update messages to therespective VLANs one by one. The usual layer 2 switch never operates anarea of the layer 2 of the packet received. However, when a packetpassing through the own device is an update message, the layer 2 switchaccording to this embodiment increments the number of steps embedded ina predetermined area of the update message by one, and transfers theupdate message. A router, which receives the update message, determinesa VLAN forming an optimum route, based on the number of steps embeddedby the layer 2 switch.

FIG. 2 is a diagram to explain an optimum route selection system usingthe RIP. A network constitution in this figure is the same as that shownin FIG. 1. It is assumed that an update message is transmitted from therouter 2000 b to the router 2000 c. The router 2000 b transmits theupdate message through the layer 2 network. Thus, the router 2000 breplicates a packet to create two update messages for the VLAN #A andthe VLAN #B, and transmits the update messages designating therespective VLANs.

The update message passing through the VLAN #A is transmitted throughthree layer 2 switches, namely, the layer 2 switches 1000 a, 1000 b, and1000 c. Every time the update message is transmitted through the layer 2switches, the number of steps of the layer 2 is incremented. Thus, whenthe router 2000 c receives the update message, the number of steps ofthe layer 2 is set to 3. On the other hand, the update message passingthrough the VLAN #B is transmitted through two layer 2 switches, namely,the layer 2 switches 1000 a and 1000 c. Thus, when the router 2000 creceives the update message, the number of steps of the layer 2 is setto 2.

The router 2000 c compares the two update messages received, anddetermines that the VLAN #B with the smaller number of steps of thelayer 2 is an optimum route. When the router 2000 c transmits a packetin a direction of the router 2000 b, the router 2000 c transmits thepacket through the VLAN #B. If there are a plurality of routes with thesmallest number of steps of the layer 2, for example, the router 2000 conly has to select a VLAN with a smallest VLAN-ID as the optimum route.

It is possible to embed the number of steps of the layer 2 in, forexample, a metric field of an update message. FIG. 3 is a diagram of aformat of an update message of the RIP. As shown in the figure, themetric field has a size of 32 bits (4 bytes). Because the maximum numberof steps of the layer 3 to be set is fifteen, only low order 5 bits areused. Therefore, it is possible to embed the number of steps of thelayer 2 using high order bits of this field.

The OSPF is a protocol with which respective routers advertise to eachother, cost values (band information) of their own respective ports asLink State Advertisement (LSA), and perform routing control using thisinformation. Whereas a shortest route is set as an optimum route in theRIP, a route having a widest band is set as an optimum route in theOSPF.

In the route selection system according to this embodiment, a cost valueof the layer 2 is embedded in an OSPF control packet for advertising theLSA. First, in transmitting an OSPF control packet through the layer 2network, a router replicates a packet by the number of VLANs set, andtransmits OSPF control packets to the respective VLANs one by one. Theusual layer 2 switch never operates an area of the layer 3 of the packetreceived. However, when a packet passing through the own device is anupdate message, the layer 2 switch according to this embodimentincrements the cost value embedded in a predetermined area of the OSPFcontrol packet by a predetermined value, and transfers the OSPF controlpacket. A router, which receives the OSPF control packet, determines aVLAN forming an optimum route based on the cost value embedded by thelayer 2 switch.

FIG. 4 is a diagram to explain an optimum route selection system usingthe OSPF. A network constitution in this figure is the same as thatshown in FIG. 1. It is assumed that an OSPF control packet istransmitted from the router 2000 b to the router 2000 c, and a uniformcost value 10 is added in each layer 2 switch. The router 2000 btransmits the OSPF control packet through the layer 2 network. Thus, therouter 2000 b replicates a packet to create two OSPF control packets forthe VLAN #A and the VLAN #B, and transmits the OSPF control packetsdesignating the respective VLANs.

The OSPF control packet passing through the VLAN #A is transmittedthrough three layer 2 switches, namely, the layer 2 switches 1000 a,1000 b, and 1000 c. Every time the OSPF control packet is transmittedthrough an output port, 10 is added as the cost value of the layer 2.Thus, when the router 2000 c receives the OSPF control packet, the costvalue of the layer 2 is set to 20. On the other hand, the OSPF controlpacket passing through the VLAN #B is transmitted through two layer 2switches, namely, the layer 2 switches 1000 a and 1000 c. Every time theOSPF control packet passes through an output port, 10 is added as thecost value of the layer 2. Thus, when the router 2000 c receives theOSPF control packet, the cost value of the layer 2 is set to 10.

The router 2000 c compares the two update messages received, anddetermines that the VLAN #B with the smaller cost value of the layer 2is an optimum route. Thus, to transmit a packet in a direction of therouter 2000 b, the router 2000 c transmits the packet through the VLAN#B.

In the example in FIG. 4, a uniform cost value is added by the layer 2switch. However, the cost value may be varied according to aninput/output direction. FIG. 5 is a diagram to explain a change inoptimum route selection when a cost value is varied. As shown in thefigure, in this example, the layer 2 switch 1000 b adds 100 as a costvalue to an OSPF control packet inputted and outputted in the directionof the layer 2 switch 1000 c. The layer 2 switch 1000 c adds 100 as acost value to an OSPF control packet inputted and outputted in thedirection of the layer 2 switch 100 b.

It is assumed here that an OSPF control packet is transmitted from therouter 2000 b to the router 2000 c. A cost value of the layer 2 is setas 20 into a packet passing through the VLAN #A. A cost value of thelayer 2 is set as 100, to a packet passing through the VLAN #B. As aresult, the router 2000 c determines that the VLAN #A with a smallercost value is an optimum route. The optimum route changes from thatshown in FIG. 4.

To vary a cost value according to an input/output direction, a costvalue, on which a band of an actual route of input/output is reflected,may be set. Alternatively, an intentional value may be set to explicitlyinstruct an optimum route. In the case of the latter system, by settingan appropriate cost value, it is possible to realize a function oftraffic engineering for preventing bias of loads of respective links ofa network.

Note that it is possible to embed a cost value of the layer 2 in, forexample, a metric field of the OSPF control packet. FIG. 6 is a diagramof a format of LSA information in the OSPF control packet. As shown inthe figure, LSA information includes an LSA header and a plurality ofrouter LSAs. The metric field is present in each router LSA, and has asize of 16 bits (2 bytes). Only low order 10 bits are substantially usedto set a cost value of the layer 3. Therefore, it is possible to embedthe cost value of the layer 2 using high order 6 bits of the field.Alternatively, it is also possible to embed the cost value in a TOSmetric field that is not used in general.

FIG. 7 is a functional block diagram of the layer 2 switch according tothis embodiment. Because the constitution of layer 2 switches 1000 a to1000 c is identical, the layer 2 switch 1000 a is explained as anexample.

As shown in the figure, the layer 2 switch 1000 a includes input ports1101 to 1102, control packet separating units 1201 to 1202, a controlunit 1300, a switch 1400, control packet multiplexing units 1501 to1502, and output ports 1601 to 1602. The input ports 1101 to 1102receive a packet. Although two input ports are shown in the figure, alarger number of input ports may be provided.

The control packet separating units 1201 to 1202 determine whetherpackets received by the input ports 1101 to 1102 are control packets. Ifthe received packets are control packets, the control packet separatingunits 1201 to 1202 pass the packets to the control unit 1300. If thereceived packets are not control packets, the control packet separatingunits 1201 to 1202 pass the packets to the switch 1400. One controlpacket separating unit is provided for each input port. In the usuallayer 2 switch, a control packet separating unit passes only a layer 2control packet (e.g., a control packet of the MSTP) to a control unit.However, the control packet separating units 1201 to 1202 also pass alayer 3 control packet (e.g., a control packet of the RIP) to thecontrol unit 1300.

The control unit 1300 processes a control packet. The control unit 1300mainly performs processing such as routing control to packets identifiedas control packets by the control packet separating units 1201 to 1202.The control unit 1300 also gives instruction to pass a control packetfor which the processing is complete, or a control packet generatedanew, to the control packet multiplexing units 1501 to 1502, and thenoutput the control packet from the output ports 1601 to 1602. A detailedconstitution of the control unit 1300 is explained separately withreference to FIG. 8.

The switch 1400 outputs packets received from the control packetseparating units 1201 to 1202 to an appropriate output port. The controlpacket multiplexing units 1501 to 1502 multiplex a control packetoutputted from the control unit 1300, and a normal packet outputted fromthe switch 1400. There is one switch for each output port. The outputports 1601 to 1602 transmit packets. Although two output ports are shownin the figure, a larger number of output ports may be provided.

FIG. 8 is a functional block diagram of the control unit 1300 shown inFIG. 7. As shown in the figure, the control unit 1300 includes a portmultiplexing unit 1301, a layer 3 (L3) control packet separating unit1302, a layer 2 (L2) route information embedding unit 1303, a controlpacket processing unit 1304, a layer 3 (L3) control packet multiplexingunit 1305, and a port separating unit 1306.

The port multiplexing unit 1301 multiplexes packets received by theinput ports 1101 to 1102 and identified as control packets by thecontrol packet separating units 1201 to 1202, and passes the packets tothe layer 3 control packet separating unit 1302. The layer 3 controlpacket separating unit 1302 determines whether the packets passed arelayer 3 control packets. If the packets are layer 3 control packets, thelayer 3 control packet separating unit 1302 passes the packets to thelayer 2 route information embedding unit 1303. If the packets are notlayer 3 control packets, the layer 3 control packet separating unit 1302passes the packets to the control packet processing unit 1304.

The layer 2 route information embedding unit 1303 embeds layer 2 routeinformation such as the number of steps and a cost value in the layer 3control packets using the system described above. The control packetprocessing unit 1304 performs route control processing that is performedby the general layer 2 switch. The layer 3 control packet multiplexingunit 1305 multiplexes a packet outputted from the layer 2 routeinformation embedding unit 1303 and a packet outputted from-the controlpacket processing unit 1304. The port separating unit 1306 outputs apacket received from the layer 3 control packet multiplexing unit 1305to an appropriate output port.

FIG. 9 is a flowchart of a process procedure performed by the controlunit 1300 shown in FIG. 7, when a control packet is received. As shownin the figure, the control unit 1300 multiplexes control packetsreceived by the input ports 1101 to 1102 in the port multiplexing unit1301 (step

The layer 3 control packet separating unit 1302 in the control unit 1300determines whether the control packets are layer 3 control packets. Ifthe control packets are the layer 3 control packets (“Yes” at stepS102), the control unit 1300 sends the packets to the layer 2 routeinformation embedding unit 1303, to embed the layer 2 route informationin the control packets (step S103). If the control packets are not thelayer 3 control packets (“No” at step S102), the control packetprocessing unit 1304 in the control unit 1300 performs usual routecontrol process (step S104).

The control unit 1300 outputs the packets subjected to the process inthe layer 2 route information embedding unit 1303 or the control packetprocessing unit 1304 to an appropriate output port via the portseparating unit 1306.

Thus, the layer 2 switches 1000 a to 1000 c according to this embodimentidentify layer 3 control packets passing through, embed the layer 2route information in the packets, and transfer the packets. The routers2000 a to 2000 c use this information to select a VLAN having an optimumroute.

FIG. 10 is a functional block diagram of a router according to thisembodiment. Because the routers 2000 a to 2000 c are identical, therouter 2000 a is explained as an example.

As shown in the figure, the router 2000 a includes input ports 2101 to2102, control packet separating units 2201 to 2202, a control unit 2300,a switch 2400, a VLAN granting units 2501 to 2502, control packetmultiplexing units 2601 to 2602, and output ports 2701 to 2702. Theinput ports 2101 to 2102 receive packets. Although two input ports areshown in the figure, a larger number of input ports may be provided.

The control packet separating units 2201 to 2202 determine whetherpackets received by the input ports 2101 to 2102 are control packets. Ifthe packets are control packets, the control packet separating units2201 to 2202 pass the packets to the control unit 2300. If the packetsare not control packets, the control packet separating units 2201 to2202 pass the packets to the switch 2400. There is one control packetseparating unit for each input port. In a usual router, a control packetseparating unit passes only a layer 3 control packet (e.g., a controlpacket of the RIP) to a control unit. However, the control packetseparating units 2201 to 2202 also pass a layer 2 control packet (e.g.,a control packet of the MSTP) to the control unit 2300.

The control unit 2300 controls the entire router 2000 a. The controlunit 2300 mainly performs processing such as routing control to packetsidentified as control packets by the control packet separating units2201 to 2202. The control unit 2300 also gives instruction to pass acontrol packet for which the processing is complete, or a control packetgenerated anew, to the control packet multiplexing units 2601 to 2602,and then output the control packet from the output ports 2701 to 2702. Adetailed constitution of the control unit 2300 is explained separatelywith reference to FIG. 11.

The switch 2400 outputs packets received from the control packetseparating units 2201 to 2202 to an appropriate output port. The VLANgranting units 2501 to 2502 grant a VLAN tag to a packet outputted bythe switch 2400 as required. There is one VLAN granting unit for eachoutput port. Specifically, when networks at an output destination aremultiple layer 2 networks, the VLAN granting units 2501 to 2502 grant aVLAN tag of a VLAN that is determined by the control unit 2300 as havinga shortest route.

The control packet multiplexing units 2601 to 2602 multiplex a controlpacket outputted from the control unit 2300, and normal packetstransmitted through the VLAN granting units 2501 to 2502. There is onecontrol packet multiplexing unit for each output port. The output ports2701 to 2702 transmit packets. Although two output ports are shown inthe figure, a larger number of output ports may be provided.

FIG. 11 is a functional block diagram of the control unit 2300 shown inFIG. 10. As shown in the figure, the control unit 2300 includes a portmultiplexing unit 2301, a layer 2 (L2) control packet separating unit2302, a VLAN-in-use analyzing unit 2303, a layer 2 (L2) network passingpacket separating unit 2304, an optimum VLAN selecting unit 2305, alayer 2 (L2) route information removing unit 2306, a layer 2 (L2)network passing packet multiplexing unit 2307, a routing controlprotocol processing unit 2308, a packet copying unit 2309, and a portseparating unit 2310.

The port multiplexing unit 2301 multiplexes packets received by theinput ports 2101 to 2102 and identified as control packets by thecontrol packet separating units 2201 to 2202, and passes the packets tothe layer 2 control packet separating unit 2302. The layer 2 controlpacket separating unit 2302 determines whether the packets passed arelayer 2 control packets. If the packets are layer 2 control packets, thelayer 2 control packet separating unit 2302 passes the packets to theVLAN-in-use analyzing unit 2303. If the packets are not layer 2 controlpackets, the layer 2 control packet separating unit 2302 passes thepackets to the layer 2 network passing packet separating unit 2304.

The VLAN-in-use analyzing unit 2303 analyzes a state of a VLAN of thelayer 2 network connected to an input port, which has received thecontrol packet, based on the layer 2 control packets. The VLAN-in-useanalyzing unit 2303 notifies a result of the analysis to the optimumVLAN selecting unit 2305 and the packet copying unit 2309.

In the route selection system according to this embodiment, a controlpacket for routing control is transmitted to respective VLANs set in thelayer 2 network, and a VLAN forming an optimum route is selected fromthe layer 2 route information included in the control packet received.Therefore, the packet copying unit 2309 that replicates control packetsto be transmitted to the respective VLANs, and the optimum VLANselecting unit 2305 that compares control packets passing through therespective VLANs, are required to know in advance what kinds of VLANsare set in the layer 2 network.

The layer 2 network passing packet separating unit 2304 determineswhether a packet has passed through the layer 2 network. If the packethas passed through the layer 2 network, the layer 2 network passingpacket separating unit 2304 sends the packet to the optimum VLANselecting unit 2305. If the packet has not passed through the layer 2network, the layer 2 network passing packet separating unit 2304 sendsthe packet to the layer 2 network passing packet multiplexing unit 2307.The layer 2 switch embeds layer 2 route information in the packet thathas passed through the layer 2 network. It is necessary for the optimumVLAN selecting unit 2305 to determine an optimum route.

The optimum VLAN selecting unit 2305 selects a VLAN forming an optimumroute in the layer 2 network connected to an input port that hasreceived the packet, based on the layer 2 route information embedded inthe control packet, and notifies the VLAN granting units 2501 to 2502 ofthe VLAN selected.

The optimum VLAN selecting unit 2305 passes to the layer 2 routeinformation removing unit 2306, only those control packets that havepassed through the VLAN having the optimum route, from among controlpackets received. In the route selection system according to thisembodiment, a layer 3 routing control packet is replicated by the numberof VLANs, and transmitted. Because the optimum VLAN selecting unit 2305disposes of control packets other than control packets that have passedthrough the VLAN forming the optimum route, it is possible to limit thenumber of control packets processed by the routing control protocolprocessing unit 2308, to the original number.

The layer 2 route information removing unit 2306 removes the layer 2route information included in a control packet. In the route selectionsystem according to this embodiment, the layer 2 route information isembedded in an unused part of the layer 3 routing control packet.However, if the route information is left as is, deficiency is likely tooccur in the existing routing control process. Thus, the layer 2 routeinformation removing unit 2306 removes the layer 2 route information toreturn the control packet to a state of a usual control packet.

The layer 2 network passing packet multiplexing unit 2307 multiplexes apacket outputted from the layer 2 route information removing unit 2306,and a packet, which has not passed through the layer 2 network,outputted from the layer 2 network passing packet separating unit 2304.The routing control protocol processing unit 2308 performs routingcontrol process as is performed by a general router.

When a transmission destination of a control packet sent by the routingcontrol protocol processing unit 2308 is the layer 2 networks mademultiple by VLANs, the packet copying unit 2309 replicates a controlpacket by the number of the VLANs, and gives VLAN tags to the packetsreplicated. The port separating unit 2310 outputs a packet received fromthe packet copying unit 2309 to an appropriate output port.

FIG. 12 is a flowchart of a process procedure of the control unit 2300shown in FIG. 10, when a control packet is received. As shown in thefigure, the control unit 2300 multiplexes control packets received bythe input ports 2101 to 2102 in the port multiplexing unit 2301 (stepS201).

The layer 2 control packet separating unit 2302 in the control unit 2300determines whether the control packets are layer 2 control packets . Ifthe control packets are layer 2 control packets (“Yes” at step S202),the VLAN-in-use analyzing unit 2303 in the control unit 2300 analyzesVLANs in use (step S203), and notifies a result of the analysis to theoptimum VLAN selecting unit 2305 and the packet copying unit 2309 (stepS204).

If the controls packets are not layer 2 control packets (“No” at stepS202), the layer 2 network passing packet separating unit 2304 in thecontrol unit 2300 determines whether the control packets have passedthrough the layer 2 network. If the control packets have not passedthrough the layer 2 network (“No” at step S205), the control unit 2300passes the packets to the layer 2 network passing packet multiplexingunit 2307.

If the packets have passed through the layer 2 network (“Yes” at stepS205), the optimum VLAN selecting unit 2305 in the control unit 2300acquires layer 2 route information included in the packets, to determinea VLAN that forms an optimum route (step S206). The control unit 2300notifies the VLAN granting units 2501 to 2502 of the optimum VLAN (stepS207).

If the packets have not passed through the optimum VLAN (“No” at stepS208), the control unit 2300 disposes of the packets without sending thepackets anywhere. If the packets have passed through the optimum VLAN(“Yes” at step S208), the layer 2 route information removing unit 2306in the control unit 2300 removes the layer 2 route information (stepS209). Then, the control unit 2300 passes the packets to the layer 2network passing packet multiplexing unit 2307.

The layer 2 network passing packet multiplexing unit 2307 in the controlunit 2300 multiplexes the packets received from the layer 2 networkpassing packet separating unit 2304, and the packets received from thelayer 2 route information removing unit 2306, and sends the packets tothe routing control protocol processing unit 2308. The routing controlprotocol processing unit 2308 in the control unit 2300 performs theusual routing control processing (step S210), and passes the processedpacket to the packet copying unit 2309.

The packet copying unit 2309 in the control unit 2300 determines whetheran output destination is the layer 2 networks made multiple by VLANs. Ifthe output destination is the multiple layer 2 networks (“Yes” at stepS211), the control unit 2300 replicates the packets by the number of theVLANs and grants VLAN tags to the packets (step S212). If the outputdestination is not the multiple layer 2 networks (“No” at step S211),the packet is not replicated. The control unit 2300 passes the packetsto the port separating unit 2310 and outputs the packets from anappropriate output port (step S213).

Thus, the routers 2000 a to 2000 c according to this embodiment identifythe layer 2 control packets passing through, analyze a state of VLANs ofthe layer 2 network from the packets, and transmit control packets forrouting control to the respective VLANs. When the routers 2000 a to 2000c receive control packets that have passed through the respective VLANs,the routers 2000 a to 2000 c determine a VLAN forming an optimum routebased on the layer 2 route information embedded in the packets.Thereafter, while transmitting data to the layer 2 network, the routers2000 a to 2000 c transmit packets to the optimum VLAN.

As described above, in this embodiment, the layer 2 switches 1000 a to2000 c embed routing control information of the layer 2 network in thelayer 3 control packet. The routers 2000 a to 2000 c determine a VLANforming an optimum route from the layer 2 routing control informationembedded in the layer 3 control packet. Thus, it is possible to alwaysselect an optimum route in the layer 2 network.

Note that, in the embodiment, although the communication device of thelayer 3 is explained as the router, the communication device of thelayer 3 may be the layer 3 switch. In addition, in the embodiment, thecommunication device of the layer 3 selects an optimum route. However,it is also possible that the layer 2 switch is provided with an optimumVLAN selecting function, an L2 route information removing function, apacket copying function, and the like, and that the communication deviceof the layer 2 located at an edge of the layer 2 network selects anoptimum route.

According to the invention, it is possible to always select an optimumroute in the layer 2 network.

Moreover, it is possible to reduce cost for management of a network.

Furthermore, it is possible to provide information for selecting anoptimum route to a communication device outside and inside the layer 2network.

Although the invention has been described with respect to a specificembodiment for a complete and clear disclosure, the appended claims arenot to be thus limited but are to be construed as embodying allmodifications and alternative constructions that may occur to oneskilled in the art that fairly fall within the basic teaching herein setforth.

1. A network system comprising: a layer 2 communication device that isincluded in multiple layer 2 networks; and a layer 3 communicationdevice that performs communication through the multiple layer 2networks, wherein the layer 2 communication device includes anidentifying unit that identifies a layer 3 control packet from amongpackets passing through the layer 2 communication device; and anembedding unit that embeds routing control information for the layer 2network in the layer 3 control packet, and the layer 3 communicationdevice includes a selecting unit that selects from the multiple layer 2networks, an optimum L2 network, that is a layer 2 network forming anoptimum communication route, based on the routing control informationfor the layer 2 network embedded in the layer 3 control packet; and asetting unit that sets a packet to be transmitted to the optimum L2network.
 2. The network system according to claim 1, wherein the layer 3communication device further includes a replicating unit that replicatesthe control packet by a number of the multiple layer 2 networks, if thecontrol packet is to be transmitted over the multiple layer 2 networks.3. A layer 3 communication device connected to multiple layer 2networks, comprising: a selecting unit that selects from the multiplelayer 2 networks, an optimum L2 network, that is a layer 2 networkforming an optimum communication route, based on a communicationdestination; and a setting unit that sets a packet to be transmitted tothe optimum L2 network.
 4. The layer 3 communication device according toclaim 3, further comprising: an analyzing unit that receives a layer 2control packet, and analyzes a state of multiplicity of the layer 2networks, based on information in the layer 2 control packet received.5. The layer 3 communication device according to claim 3, wherein themultiple layer 2 networks are VLANs (Virtual Local Area Networks). 6.The layer 3 communication device according to claim 3, wherein thesetting unit removes layer 2 routing information from the packet, if thepacket is a layer 2 control packet that has passed through a layer 2network.
 7. A layer 2 communication device that is included in a layer 2network, comprising: an identifying unit that identifies a layer 3control packet from among packets passing through the layer 2communication device; and an embedding unit that embeds routing controlinformation for the layer 2 network in the layer 3 control packet. 8.The layer 2 communication device according to claim 7, wherein therouting control information embedded includes a number of steps of thelayer 2 communication device, and the embedding unit increments thenumber of steps by one, every time the layer 3 control packet passesthrough the layer 2 communication device.
 9. The layer 2 communicationdevice according to claim 7, wherein the routing control informationembedded includes a cost value assigned to each output port of the layer2 communication device, and the embedding unit increments the cost valueembedded by a cost value of an output port, if the layer 3 controlpacket passes through the layer 2 communication device.
 10. The layer 2communication device according to claim 9, wherein the cost value issame for all the output ports.
 11. The layer 2 communication deviceaccording to claim 9, wherein the cost value is different for each thelayer 2 communication device.
 12. The layer 2 communication deviceaccording to claim 7, wherein the embedding unit embeds the routingcontrol information for the layer 2 network in unused bits of a metricfield of an update message of a Routing Information Protocol (RIP). 13.The layer 2 communication device according to claim 7, wherein theembedding unit embeds the routing control information for the layer 2network in unused bits of a metric field of a Link State Advertisement(LSA) of an Open Shortest Path First (OSPF).
 14. A method for a networksystem that includes a layer 2 communication device that is included inmultiple layer 2 networks, and a layer 3 communication device thatperforms communication through the multiple layer 2 networks, the methodcomprising: identifying, performed by the layer 2 communication device,a layer 3 control packet from among packets passing through the layer 2communication device; embedding, performed by the layer 2 communicationdevice, routing control information for the layer 2 network in the layer3 control packet; selecting, performed by the layer 3 communicationdevice, from the multiple layer 2 networks, an optimum L2 network, thatis a layer 2 network forming an optimum communication route, based onthe routing control information for the layer 2 network embedded in thelayer 3 control packet; and setting, performed by the layer 3communication device, a packet to be transmitted to the optimum L2network.
 15. The method according to claim 14, wherein the embeddingincludes embedding routing control information that includes a number ofsteps of the layer 2 communication device, and incrementing the numberof steps by one, every time the layer 3 control packet passes throughthe layer 2 communication device, and the selecting includes selecting alayer 2 network having a least number of steps, as the optimum L2network.
 16. The method according to claim 14, wherein the embeddingincludes embedding routing control information that includes a costvalue assigned to each output port of the layer 2 communication device,and incrementing the cost value embedded by a cost value of an outputport, if the layer 3 control packet passes through the layer 2communication device, and the selecting includes selecting a layer 2network having a least cost value, as the optimum L2 network.
 17. Themethod according to claim 16, wherein the cost value of all the outputports is same for all the output ports.
 18. The method according toclaim 16, wherein the cost value of an output port is different in eachlayer 2 communication device.